#!/usr/bin/python3

str='123456789'

print(str)
print(str[0:-1])
print(str[0])
print(str[1])
print(str[2])
print(str[-1])
print(str[2:5])
print(str[1:5:2])
print(str*2)
print(str+'你好')

print('-------------------')

print('hello\n world')
print(r'hello\n world')

# 输出空行
print('\n')
# 输出\n
print(r'hello\n world')


